/*
 *
 */
package com.oracle.javaee.business;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.ejb.Local;
import javax.ejb.LocalBean;
import javax.ejb.Remote;
import javax.ejb.Stateless;

/**
 * Very simple ejb.
 * 
 * @version $Id$
 */
@Stateless
@Local(HelloLocal.class)
@Remote(HelloRemote.class)
@LocalBean
public class HelloBean implements HelloLocal, HelloRemote {
    private final DateFormat df = new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss");

    /**
     *
     */
    @Override
    public String sayHello() {
        return "Hello, world. - " + df.format(new Date());
    }

    /**
     *
     */
    @Override
    public String getTime() {
        return df.format(new Date());
    }
}
